# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=gnome-logs
pkgver=3.30.0
pkgrel=1
pkgdesc="A log viewer for the systemd journal"
url="https://wiki.gnome.org/Apps/Logs"
arch=(x86_64)
license=(GPL)
depends=(systemd gtk3 gsettings-desktop-schemas)
makedepends=(appstream-glib git meson itstool docbook-xsl)
groups=(gnome)
_commit=af72655c2c71fb951815f40a21cc0a3ccea1d6e6  # tags/gnome-logs-3.30.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-logs.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^gnome-logs-//;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D tests=true -D man=true
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
